<?php
/**
 * Created by PhpStorm.
 * User: 13469
 * Date: 2018/12/8
 * Time: 10:32
 */

include "config.php";
$sqls="SELECT  *FROM cart";
$res=$conn->query($sqls);
$arr=array();
if($res->num_rows>=1){
    while($row=$res->fetch_assoc()){
        array_push($arr,$row);
    };
};
print_r(json_encode($arr));